#include<iostream>
#include<vector>
#include<map>
using namespace std;


class Solution {
public:
    vector<int> twoSum(vector<int>& numbers, int target) {
        map<int, int> mp;
        int n = numbers.size();
        int idx = 0;

        for (int i = 0; i < n; i++) {
            idx = mp[target - numbers[i]];
            if (idx != 0) {
                return {idx, i + 1};
            }

            mp[numbers[i]] = i + 1;
        }

        return {};
    }
};